package com.bss.dao;

// Generated Nov 1, 2011 10:54:22 PM by Hibernate Tools 3.3.0.GA

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.andy.basics.Dao;
import com.bss.model.User;

@Repository
public class UserDao extends Dao<User> {

	private static final Log log = LogFactory.getLog(UserDao.class);

	@Transactional
	public User findUser(String username) {
		log.debug("Finding User");
		return ((User) this.getEntityManager().createQuery("select u from User u where u.loginName = :username")
				.setParameter("username", username).getSingleResult());
	}
}
